package com.easychat.entity.enums;

/**
 * @Author Dongdong
 * @注释  用户状态枚举
 */

public enum UserStatusEnum {
    DISABLE(0,"禁用"),
    ENABLE(1,"启用");
    private Integer status;
    private String desc;

    UserStatusEnum(Integer status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public static UserStatusEnum getByCode(Integer status) {
        for (UserStatusEnum userStatusEnum : UserStatusEnum.values()) {
            if(userStatusEnum.getStatus().equals(status)) {
                return userStatusEnum;
            }
        }
        return null;
    }

    public Integer getStatus() {
        return status;
    }

    public String getDesc() {
        return desc;
    }
}
